package com.snail.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.ai.chat.memory.ChatMemory;
import org.springframework.ai.chat.memory.ChatMemoryRepository;
import org.springframework.ai.chat.memory.MessageWindowChatMemory;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;

import java.util.List;

/**
 * @author cici
 * @description mcp的配置
 * @date 2025/8/16 15:47
 */
@Configuration
public class McpClientConfig {
    /**
     * 将 MCP Client 的工具注册到 AI 工具回调中
     */
    @Bean
    public ToolCallbackProvider toolCallbackProvider(List<ToolCallback> toolCallbacks) {
        return ToolCallbackProvider.from(toolCallbacks) ;// 对应 yml 里的配置,直接读取yml配置的服务端口配置

    }



}
